﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using RubricaSentimentale.Model;

namespace RubricaSentimentale
{
	public partial class Details : UserControl
	{
        public string Intestazione { get; set; }
        public string tipo="film";

		public Details()
		{
			// Required to initialize variables
			InitializeComponent();
			btnAdd.Click+=new System.Windows.RoutedEventHandler(btnAdd_Click);
            this.Loaded += new RoutedEventHandler(Details_Loaded);
		}

        void Details_Loaded(object sender, RoutedEventArgs e)
        {
            //Container.Height = this.ActualHeight - 100;
        }

		private void btnAdd_Click(object sender, System.Windows.RoutedEventArgs e)
		{
            (DataContext as FormattedList<MyString>).Add(new MyString(tbxDettaglio.Text));
		}

        private void Image_Tap(object sender, GestureEventArgs e)
        {
            (DataContext as FormattedList<MyString>).Remove((MyString)(sender as Image).DataContext);
        }

	}
}